<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Vue CDN</title>
    <script type="importmap">
        {
          "imports": {
            "vue": "./vue.esm-browser.js"
          }
        }
    </script>
</head>
<body>
    <div id="app">{{ message }}</div>
    <script type="module">
        import { createApp, ref } from 'vue'

        //创建并导入根组件
        import App from './app.js'

        //创建应用实例 并 导入 根组件
        const app = createApp(App)

        //错误处理
        app.config.errorHandler = (err) => {
            /* 处理错误 */
        }
        app.config.globalProperties.msg = 'hello'

        //挂载应用
        app.mount('#app')

    </script>
</body>
</html>